<%@ include file="/jsp/include.jsp" %>
<%
String redirect = ParamUtil.getString(request, "redirect");

BookSearch searchContainer = (BookSearch)request.getAttribute("liferay-ui:search:searchContainer");
BookDisplayTerms displayTerms = (BookDisplayTerms)searchContainer.getDisplayTerms();
%>
<aui:input label="Book.Title" name='<%= displayTerms.TITLE %>' size='30' value='<%= displayTerms.getTitle() != null ? displayTerms.getTitle() : "" %>' />
<aui:button-row>
	<aui:button type="submit" value="Command.Search" /> 
		<%
		String taglibOnClick = "location.href = '" + HtmlUtil.escape(redirect) + "';";
		%>
	<aui:button type="button" value="Command.Cancel"  onClick="<%= taglibOnClick %>" />
</aui:button-row>

<c:if test="<%= windowState.equals(WindowState.MAXIMIZED) %>">
	<aui:script>
		Liferay.Util.focusFormField(document.<portlet:namespace />fm.<portlet:namespace /><%= displayTerms.TITLE %>);
	</aui:script>
</c:if>